// Copyright 2009 StarCite Inc.  All rights reserved.
// PropertyUtil.java 4:15:23 PM danny.liu
package com.billowsoft.research.jdbc;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

/**
 * @author danny.liu May 30, 2012
 * @version 1.0
 * 
 */
public class PropertyUtil {

	public static void loadProperties(String fileName)
			throws FileNotFoundException, IOException {

		Properties properties = new Properties();
		File file = new File(fileName);
		System.out.println(file.getAbsolutePath());
		properties.load(new FileInputStream(file));
		for (Object key : properties.keySet()) {
			Object value = properties.get(key);
			System.setProperty((String) key, (String) value);
		}
	}
}
